<?php
/**
 * Created by PhpStorm.
 * User: weijer
 * Date: 2018/10/26
 * Time: 21:17
 */

namespace common\validate;

use think\Validate;

class UrgeMessage extends BaseValidate
{
    //验证规则
    protected $rule = [];

    // Create 验证场景定义
    public function sceneCreate()
    {
        return $this->append('data.user_ids', 'require|array')
            ->append('data.content', 'require|array')
            ->append('data.type', 'require|in:app,sms')
            ->append('data.source.type', 'require|in:one2one,group');
    }

    public function sceneGetList()
    {
        return $this->append('param', 'require|array')
            ->append('param.filter', 'array');
    }

    public function sceneUpdateUrgeMessageRead()
    {
        return $this->append('data.urge_message_id', 'require');

    }

    public function sceneUpdateUrgeMessageMember()
    {
        return $this->append('data.urge_message_id', 'require');

    }

}
